/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bo;

import java.io.IOException;
import java.io.OutputStream;

/**
 *
 * @author amine.tayaa
 */
public class SerialWriter {

    OutputStream out;

	        public SerialWriter ( OutputStream out )
	        {
	            this.out = out;
	        }

	        public void run ()
	        {
	            try
	            {
	                int c = 0;
	                while ( ( c = System.in.read()) > -1 )
	                {
	                    this.out.write(c);
	                }
	            }
	            catch ( IOException e )
	            {
	                e.printStackTrace();
	            }
	        }
}



